
package com.epam.android.training.level1.poll;

import com.epam.android.training.level1.UniqueEntity;

/**
 * @author Anton Novikau
 */
public class AnswerBo implements UniqueEntity {
  private long id;

  private long questionId;

  private String displayName;

  private boolean isCorrect;

  @Override
  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }

  public long getQuestionId() {
    return questionId;
  }

  public void setQuestionId(long questionId) {
    this.questionId = questionId;
  }

  public String getDisplayName() {
    return displayName;
  }

  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }

  public boolean isCorrect() {
    return isCorrect;
  }

  public void setCorrect(boolean isCorrect) {
    this.isCorrect = isCorrect;
  }

  public void setCorrect(int isCorrect) {
    this.isCorrect = isCorrect == 1;
  }

  @Override
  public String toString() {
    return getDisplayName();
  }
}
